package Dungeoneering.Entities;

import Dungeoneering.Keys.KeyColor;
import Dungeoneering.Keys.KeyShape;

/**
 * This resembles a key, every skilldoor is linked to a key once we find one. and other way around
 * @author Nicolaas
 *
 */
public class Key {

	private KeyColor color;
	private KeyShape shape;
	
	public Key(KeyColor color, KeyShape shape) {
		this.color = color;
		this.shape = shape;
	}
	
	public Key(int id) {
		if (KeyColor.isKey(id)) {
			color = KeyColor.getKeyFromItem(id);
			shape = KeyShape.getShape(id);
		}
	}
	
	/**
	 * gets the full name of the key
	 * @return the full name of the key
	 */
	public String getName() {
		return color.getName() + shape.getName();
	}
	
	/**
	 * tries to find the id of the object that this key unlocks
	 * @return the Location id
	 */
	public int getKeyDoorId() {
		return 0; // TODO : implement
	}
}
